@echo off
setlocal enabledelayedexpansion

:: directory of this file
set SCRIPT_DIR=%~dp0

:: install directory
if "!INSTALL_DIR!"=="" (
	set INSTALL_DIR=%SCRIPT_DIR%..\
)

:: console output charset
set STDOUT_CHARSET=-Dfile.encoding=IBM866

:: main class
set MAIN_CLASS=tv.cofe.blogger.CLI

:: java interpreter
set JAVA=java

:: find jar files
set CP=
for /R %INSTALL_DIR%lib\ %%i in ( "*.jar" ) do (
	set CP=!CP!;%%i
)

:: execute
!JAVA! -cp "!CP!" !STDOUT_CHARSET! !MAIN_CLASS! %*